#!/usr/bin/php
<?php
// initialise the voswork environment
require_once __DIR__.'/../voswork-core/kernel.class.php';
kernel::bootstrap();

echo "Portal-asm\n\n";
//echo "Compiling ".SOURCE_FILE." to ".OUTPUT_FILE."...\n";

$html = new assembler(SOURCE_FILE);

$size = ceil(filesize(OUTPUT_FILE)/1000);

echo "\nFinished in ".kernel::elapsed()."ms.\n";
echo "Resulting binary is $size KB";

if (!@file_put_contents(OUTPUT_FILE,$html) )
	throw new Exception("Could not save to ".OUTPUT_FILE);



?>
